package com.jiang.jetpackdemo.http

import com.jiang.jetpackdemo.model.ImgInfo
import com.jiang.jetpackdemo.model.VideoRecommendInfo
import retrofit2.Call
import retrofit2.http.GET
import retrofit2.http.Query
import retrofit2.http.Url

interface RetrofitAPI {

    @GET("videoRecommend")
    fun getVideoRecommend(@Query("id") id: String): Call<VideoRecommendInfo>

    @GET("videoRecommend")
    suspend fun getVideoRecommendInfo(@Query("id") id: String): VideoRecommendInfo

    @GET
    suspend fun getRandomPic(@Url url: String): ImgInfo
}